package org.example.Service;

import org.apache.ibatis.annotations.Param;
import org.example.pojo.OrderDetails;

import java.util.List;

public interface OrderDetailsService {
    //查询全部订单详情
    List<OrderDetails> selectOrderDetails();
    //查询该detail_id的订单详情
    OrderDetails selectOrderDetailsByID(@Param("detail_id")Integer id);
    //查询该order_id的订单详情
    OrderDetails selectOrderDetailsByOrderID(@Param("order_id")Integer order_id);
    //添加订单详情
    int insertOrderDetails(OrderDetails orderDetails);
    //修改订单详情
    int updateOrderDetails(OrderDetails orderDetails);
    //删除订单详情
    int deleteOrderDetails(@Param("detail_id")Integer id);
    //根据OrderID删除订单详情
    int deleteOrderDetailsByOrderID(@Param("order_id")Integer order_id);
}
